package com.yunxin.core.wechat.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yunxin.core.wechat.domain.WechatAuth;
import com.yunxin.core.wechat.domain.WechatFollowCustomer;
import com.yunxin.core.wechat.domain.WechatInfo;
import com.yunxin.core.wechat.dto.GetWechatCustomersDto;
import com.yunxin.core.wechat.dto.UpdateWechatCustomerRemarkDto;
import com.yunxin.core.wechat.dto.UpdateWechatCustomerTagsDto;
import com.yunxin.core.wechat.javaxml.com.qq.weixin.mp.aes.AesException;
import com.yunxin.core.wechat.vo.LoginDetailVo;
import com.yunxin.core.wechat.vo.LoginVo;
import com.yunxin.core.wechat.vo.WechatFollowCustomerListVo;
import com.yunxin.core.wechat.vo.WechatGroupTagVo;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;
import java.util.Map;
//调用企微接口的规范
public interface QyWxService {

    //验证请求是否合法
    Object verificationUrl(HttpServletRequest request, Integer type, WechatInfo wechatInfo) throws AesException;
    //处理指令回调的body参数
    Map<String, String> getRequestParameter(HttpServletRequest request, String body, WechatInfo wechatInfo) throws AesException;
    //通过企业微信id 获取授权企业凭证
    String getCorpTokenByCorpId(String corpId);
    //登录消费code
    LoginVo getuserinfo( String code,WechatInfo wechatInfo);
    //通过手机号获得指定企业用户id
    String getWechatUserByPhone(String phone,String corpId);
    //通过邮箱获得指定企业用户id
    String getWechatUserByEmail(String email,String corpId,Integer emailType);
    //获取企业所有标签
    List<WechatGroupTagVo> getWechatTags(String corpId);
    //批量获取客户信息
    WechatFollowCustomerListVo getWechatCustomers(String corpId, GetWechatCustomersDto getWechatCustomersDto);
    //通过客户id获取客户详情
    WechatFollowCustomer getWechatCustomer(String corpId, String externalUserid,String wechatUserid);

    boolean getUserByUserId(String corpId, String userid);




    //修改客户备注信息
    Boolean updateWechatCustomerRemark(String corpId, UpdateWechatCustomerRemarkDto updateWechatCustomerRemarkDto);
    //修改用户标签
    Boolean updateWechatCustomerTags(String corpId, UpdateWechatCustomerTagsDto updateWechatCustomerTagsDto);
    //获取到登录者详情(第三方应用 无权调用该接口)
    LoginDetailVo getuserdetail(String corpId, String user_ticket);

}
